import plugin from '../../lib/plugins/plugin.js'
import { segment } from "oicq";
import fetch from 'node-fetch'
import cfg from '../../lib/config/config.js'
export class example extends plugin {
  constructor () {
    super({
      /** 功能名称 */
      name: '色图盲盒', 
     /** 功能描述 */
      dsc: '有概率开出色图',
      event: 'message',
     /** 优先级，数字越小等级越高 */
      priority: 50000,
      rule: [
        {
          /** 命令正则匹配 */
          reg: '^开个盲盒$',
          /** 执行方法 */
          fnc: 'manghe'
        },
      ]
    })
  }
async  manghe(e) { 
     //执行的逻辑功能
  let url = `https://iw233.cn/API/Random.php`;
  let msg = [
      segment.image(url),
      ]
  //发送消息
  e.reply(msg);
  return true; //返回true 阻挡消息不再往下
}
}
